﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Altairis.Nemesis.Gallery.Configuration {
    public class InfoPageElement : ConfigurationElement {

        [ConfigurationProperty("enabled", IsRequired = false, DefaultValue = true)]
        public bool Enabled {
            get { return (bool)this["enabled"]; }
            set { this["enabled"] = value; }
        }

        [ConfigurationProperty("template", IsRequired = false, DefaultValue = "~/App_Data/Templates/Default/InfoPage.xsl")]
        public string Template {
            get { return (string)this["template"]; }
            set { this["template"] = value; }
        }

        [ConfigurationProperty("cacheTimeout", IsRequired = false, DefaultValue = 60)]
        [IntegerValidator(MinValue = 0)]
        public int CacheTimeout {
            get { return (int)this["cacheTimeout"]; }
            set { this["cacheTimeout"] = value; }
        }

        [ConfigurationProperty("varyByParams", IsRequired = false, DefaultValue = false)]
        public bool VaryByParams {
            get { return (bool)this["varyByParams"]; }
            set { this["varyByParams"] = value; }
        }

        [ConfigurationProperty("dependOnFolder", IsRequired = false, DefaultValue = true)]
        public bool DependOnFolder {
            get { return (bool)this["dependOnFolder"]; }
            set { this["dependOnFolder"] = value; }
        }

    }
}
